﻿using System;
using System.Linq;

class CalculateSumWithAccuracy
{
    static void Main(string[] args)
    {
		System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;
        // Initialize
        double sum = 1;
        double oldSum = 0;

        // Calculate sum with precision 0.001
        for (int i = 2; Math.Abs(sum - oldSum) > 0.001; i++)
        {
            oldSum = sum;
            sum = sum + 1.0 / i;
        }

        // Print result
        Console.WriteLine("{0:F3}", sum);
    }
}
